package pers.jason.wppm.auth.api.dto;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Email;
import pers.jason.wppm.api.support.Regular;

import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 
 * @author Jason
 * @Date 2018-10-25 16:32
 *
 */
@Data
@Api(value="条件查询用户列表的参数")
public class UserQueryCondition implements Serializable {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "用户名")
	@Size(min = 2, max = 32, message = "用户名必须在长度2~32位之间")
	private String userName;

	@Email(message = "邮箱地址格式错误")
	@ApiModelProperty(value = "邮箱地址")
	private String email;

	@ApiModelProperty(value = "电话号码")
	@Pattern(regexp = Regular.REP_MOBILE, message = "手机号码格式不正确")
	private String mobile;
	
	@ApiModelProperty(value = "性别")
	private Boolean gender;

}
